package com.go.where.family.service.impl;

import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.go.where.family.dao.AlbumDao;
import com.go.where.family.pojo.AlbumInfo;
import com.go.where.family.service.AlbumService;

@Service("albumService")
public class AlbumServiceImpl implements AlbumService {

	@Resource(name = "albumDao")
	private AlbumDao albumDao;

	@Override
	public List<AlbumInfo> queryList(Map<String, Object> map) {
		return albumDao.queryT(map);
	}

	@Override
	public AlbumInfo queryAlbumDetail(String id) {
		AlbumInfo album = new AlbumInfo();
		album.setId(id);
		return albumDao.queryByPrimaryKey(album);
	}

	@Override
	public int update(AlbumInfo album) {
		album.setUpdateTime(new Date());
		return albumDao.update(album);
	}

	@Override
	public Long queryTotalSupport(Map<String, Object> map) {
		return albumDao.queryTotalSupport(map);
	}

}
